import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:比那名居的桃子
 * User: wangxin
 * Date: 2024-08-03
 * Time: 17:36
 */
public class test3 {

        public static void main(String[] args){
            Scanner in = new Scanner(System.in);
            int m = in.nextInt();
            int k = in.nextInt();
            long[] a = new long[m+1];
            long[] b = new long[m+1];
            for(int i = 1;i <= m;i++){
                a[i] = in.nextLong();
            }
            for(int i = 1;i <= m;i++){
                b[i] = in.nextLong();
            }
            long ret = 0;
            long ret2 = 0;
            int day = 1;
            for(int i = 1;i <= k;i++){
                ret += a[i];
                ret2 += b[i];
            }
            long maxRet1 = ret;
            long minRet2 = ret2;
            int left = 1;
            int right = k+1;
            while(right <= m){
                ret -= a[left];
                ret += a[right];
                ret2 -= b[left];
                ret2 += b[right];
                if(ret > maxRet1){
                    maxRet1 = ret;
                    minRet2 = ret2;
                    day = left + 1;
                }else if(ret == maxRet1 && ret2 < minRet2){
                    maxRet1 = ret;
                    minRet2 = ret2;
                    day = left + 1;
                }
                left++;
                right++;
            }
            System.out.println(day);
        }

}
